﻿<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-access="property" default-lazy="true" namespace="Cms.Domain" assembly="Cms.Domain">
  <class name="Stylesheet" table="cmsStylesheet">
    <cache usage="read-write" />
    <id name="ID" type="System.Int32" unsaved-value="0">
      <column name="ID" />
      <generator class="identity" />
    </id>
    <property name="Name" type="System.String">
      <column name="Name" not-null="true" />
    </property>
    <property name="Context" type="System.Int32">
      <column name="ContextID" not-null="true" />
    </property>
    <bag cascade="all-delete-orphan" inverse="true" name="AssociatedMasterTemplates" table="cmsMasterTemplateStylesheet" mutable="true">
      <cache usage="read-write" />
      <key>
        <column name="StylesheetID" />
      </key>
      <one-to-many class="MasterTemplateStylesheet" />
    </bag>
    <many-to-one cascade="all" class="SourceCode" name="SourceCode">
      <column name="SourceCodeID" not-null="true" />
    </many-to-one>
    <many-to-one class="Site" name="Site">
      <column name="SiteID" not-null="true" />
    </many-to-one>
  </class>
</hibernate-mapping>